package com.bd.scm.dao.mapper.vacation;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bd.scm.domain.models.vacation.HolidaysTime;
import org.apache.ibatis.annotations.Param;

/**
 * @author yufc
 */

public interface HolidaysTimeMapper extends BaseMapper<HolidaysTime> {
    /**
     * delete by primary key
     * @param userSerial primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(@Param("userSerial") Long userSerial, @Param("userDept") Long userDept, @Param("timeYear") Integer timeYear, @Param("timeMonth") Integer timeMonth);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(HolidaysTime record);

    /**
     * select by primary key
     * @param userSerial primary key
     * @return object by primary key
     */
    HolidaysTime selectByPrimaryKey(@Param("userSerial") Long userSerial, @Param("userDept") Long userDept, @Param("timeYear") Integer timeYear, @Param("timeMonth") Integer timeMonth);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(HolidaysTime record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(HolidaysTime record);

    int batchInsert(@Param("list") List<HolidaysTime> list);
}